﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Model.Util;
using Xproject.Framework.Utility.Extensions;
using Xproject.Framework.Core.Repositories;
using Xproject.Framework.Utility.ExceptionHandling;
using Xproject.Framework.Core;
using System.Linq.Expressions;

namespace Repository.Util
{
    public static class CategoryRep
    {
        public static List<Category> GetCategoryList(this IRepositoryAsync<Category> repository)
        {
            Expression<Func<Category, bool>> express = i => 1 == 1;

            return repository.Query().Where(express).Select().OrderByDescending(i => i.Layer).ToList();
        }
    }
}
